#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "Key.h"
#include "LED.h"
#include "LightSensor.h"
#include "Buzzer.h"

int main(void)
{
	LightSensor_Init();
	Buzzer_Init();
	LED_Init();
	uint8_t lightState = 0;
	while (1)
	{
		lightState = LightSensor_In();
		if (lightState == 1)
		{
			Buzzer_On();
			LED1_On();
			LED2_Off();
		}
		else 
		{
			Buzzer_Off();
			LED1_Off();
			LED2_On();
		}
	}	
}
